<%= render layout: "layouts/decidim/shared/layout_center" do %>

  <%= render partial: "wizard_header" %>

  <div class="space-y-8 my-10">
    <h2 class="h3 text-secondary"><%= present(emendation).title(html_escape: true) %></h2>

    <%= cell "decidim/coauthorships", emendation %>

    <div class="editor-content">
      <%= render_emendation_body(emendation) %>
    </div>

    <%= cell "decidim/tags", emendation %>
  </div>

  <div class="form__wrapper-block flex-col-reverse md:flex-row justify-between">
    <%= link_to wizard_aside_back_url(amendable), class: "button button__sm md:button__lg button__text-secondary" do %>
      <%= icon "arrow-left-line" %>
      <%= t("back", scope: "decidim.wizard_step_form.wizard_aside") %>
    <% end %>
    <%= link_to edit_draft_amend_path(amendment), class: "button button__sm md:button__lg button__transparent-secondary" do %>
      <span><%= t("modify", scope: "decidim.amendments.preview_draft") %></span>
    <% end %>
    <%= button_to publish_draft_amend_path(amendment), method: :post, class: "button button__sm md:button__lg button__secondary" do %>
      <span><%= t("publish", scope: "decidim.amendments.preview_draft") %></span>
      <%= icon "arrow-right-line" %>
    <% end %>
  </div>

<% end %>
